package com.naiterui.ehp.ps.sms.enums;

public enum HongdouStatus {
    SUCCESS("00000", "成功"),
    /**
     * api相关
     **/
    APP_KEY_UNFILLED("F0001", "app key未填写"),
    APP_CODE_UNFILLED("F0002", "app code未填写"),
    APP_PHONE_UNFILLED("F0003", "手机号未填写"),
    APP_SIGN_UNFILLED("F0004", "sign未填写"),
    APP_TIMESTAMP_UNFILLED("F0005", "timestamp未填写"),
    APP_KEY_NOT_VALIAD("F0006", "app key不存在"),
    ACCOUNT_CLOSE("F0007", "账号已关闭"),
    SIGN_CHECK_ERROR("F0008", "sign检验错误"),
    ACCOUNT_BUSINESS_NOT_VALIAD("F0010", "账号下没有业务"),
    BUSINESS_NOT_EXIST("F0010", "账号业务不存在"),
    PHONE_OVERRUN("F0011", "号码不能超过1000个 "),
    TIMESTAMP_ERROR("F0012", "timestamp不是数字"),
    TIMESTAMP_EXPIRED("F0013", "timestamp过期超过5分钟"),
    IP_NOT_WHITELIST("F0014", "请求ip不在白名单内"),
    INSUFFICIENT_BALANCE("F0015", "余额不足"),
    PHONE_INVALID("F0016", "手机号无效"),
    NO_BUSINESS("F0017", "没有可用的业务"),
    MSG_IS_EMPTY("F0022", "参数msg未填写"),
    MSG_OVERRUN("F0023", "msg超过了1000个字"),
    EXTEND_ERROR("F0024", "extend不是纯数字"),
    CONETENT_NO_SIGN("F0025", "内容签名未报备/无签名"),
    MSG_UNFILLED("F0039", "参数sms未填写"),
    MSG_INCORRECT_FORMAT("F0040", "内容签名未报备/无签名"),
    MSG_SIZE_OVERRUN("F0041", "短信条数超过1000条"),
    NO_DATA("F0050", "无数据"),
    UNKNOWN_MISTAKE("F0100", "未知错误");;

    /**
     * 异常代码
     */
    public final String code;

    /**
     * 异常消息
     */
    public final String msg;

    /**
     * 构造函数
     */
    HongdouStatus() {
        this.code = "000000";
        this.msg = "success";
    }

    /**
     * 构造函数
     *
     * @param code
     * @param msg
     */
    HongdouStatus(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    /**
     * 获取异常信息 CloopenStatus.msg()<BR>
     * <p>
     * Author :
     * </P>
     * <p>
     * Date : 2017-7-28
     * </P>
     *
     * @return
     */
    public String msg() {
        return this.msg;
    }

    /**
     * 获取异常状态码 CloopenStatus.code()<BR>
     * <p>
     * Author :
     * </P>
     * <p>
     * Date : 2017-7-28
     * </P>
     *
     * @return
     */
    public String code() {
        return this.code;
    }
}
